package com.fivium.bpd.editor;

import java.awt.BorderLayout;

import javax.swing.JEditorPane;
import javax.swing.JPanel;

import jsyntaxpane.DefaultSyntaxKit;
import javax.swing.JScrollPane;
import javax.swing.text.PlainDocument;

public class QuerySQLPanel extends JPanel
{

  /**
   * Create the panel.
   */
  public QuerySQLPanel()
  {
    setLayout(new BorderLayout(0, 0));
    
    DefaultSyntaxKit.initKit();
    
    final JEditorPane sqlEditor = new JEditorPane();
    
    final JScrollPane sqlEditorScrollPane = new JScrollPane(sqlEditor);
    add(sqlEditorScrollPane, BorderLayout.CENTER);
    
    DefaultSyntaxKit.initKit();
    
    sqlEditor.setContentType("text/sql");
    sqlEditor.setText("SELECT *\nFROM dual;");
    sqlEditor.getDocument().putProperty(PlainDocument.tabSizeAttribute, 2);
  }
}
